package com.kalvin.kvf.modules.dep.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.kalvin.kvf.modules.dep.entity.Adv;
import com.kalvin.kvf.modules.dep.mapper.AdvMapper;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 * @since 2021-04-21 21:17:26
 */
@Service
public class AdvServiceImpl extends ServiceImpl<AdvMapper, Adv> implements AdvService {

    @Override
    public Page<Adv> listAdvPage(Adv adv) {
        Page<Adv> page = new Page<>(adv.getCurrent(), adv.getSize());
        List<Adv> advs = baseMapper.selectAdvList(adv, page);
        return page.setRecords(advs);
    }

}
